{% load analytics cache compress disqus_tags flatblock_tags generic_content i18n navbar %}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>{% block title %}{{ BLOG_SETTINGS.site_name }}{% endblock %}</title>

    {% block meta %}
    <meta name="keywords" content="{{ BLOG_SETTINGS.meta_keywords }}">
    <meta name="description" content="{{ BLOG_SETTINGS.meta_description }}">
    <meta name="author" content="{{ BLOG_SETTINGS.author_name }}">
    {% endblock %}

    <meta name="copyright" content="{{ BLOG_SETTINGS.copyright }}" />
    <link rel="shortcut icon" href="{{ STATIC_URL }}img/brackets.ico" type="image/x-icon"/>

    {% block rss %}
    <link rel="alternate" type="application/rss+xml" title="{{ BLOG_SETTINGS.site_name }} main rss feed" href="{{ BLOG_SETTINGS.rss_url }}">
    <link rel="alternate" type="application/rss+xml" title="{{ BLOG_SETTINGS.site_name }} all entries feed" href="/feeds/all/">
    <link rel="alternate" type="application/rss+xml" title="{{ BLOG_SETTINGS.site_name }} all posts feed" href="/feeds/latest/">
    {% if category %}<link rel="alternate" type="application/rss+xml" title="{{ BLOG_SETTINGS.site_name }} - {{ category }} posts" href="/feeds/categories/{{ category.title|lower }}">{% endif %}
    {% endblock %}

    {% compress css %}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/960.css" type="text/css" media="all" charset="utf-8">
    <link rel="stylesheet" href="{{ STATIC_URL }}css/prettify.css" type="text/css" media="all" charset="utf-8">
    <link rel="stylesheet" href="{{ STATIC_URL }}css/pygments.css" type="text/css" media="all" charset="utf-8">
    <link rel="stylesheet" href="{{ STATIC_URL }}css/base.css" type="text/css" media="all" charset="utf-8">
    <!-- between concepts -->
    <link rel="stylesheet" href="{{ STATIC_URL }}css/themes/basic.css" type="text/css" media="all" charset="utf-8">
    {% endcompress %}

    <!--[if IE 6]>
    <script src="{{ STATIC_URL }}js/DD_belatedPNG_0.0.7a-min.js"></script>
    <script>
      DD_belatedPNG.fix('#bleeder, .logo');
    </script>
    <style>
      #bleeder{ display: none;}
      #form-search{ width: auto; display: block; float: right; clear: both;}
      .navbar-one{ float: right; clear: both;}
    </style>
    <![endif]-->

    {% disqus_dev %}
    {% block extra_head %}{% endblock %}
  </head>
  <body id="{% block body_id %}{% endblock %}" class="{% block body_class %}blog{% endblock %}">
    <div id="bleeder"></div>
  
    <div id="body-container" class="clearfix">
    {% block body %}

      <div id="header" class="clearfix">
        <div id="logo">
           <h1><a href="/" title="{{ BLOG_SETTINGS.site_name }}">{{ BLOG_SETTINGS.site_name }}</a></h1>
        </div>
        <!-- /logo -->

        <div id="nav">
          <form action="/search/" method="GET">
            <span class="left-search"><input type="text" name="q" value="{{ search_term }}"></span>
            <span class="right-search"><input type="submit" class="button" value="{% trans "Search" %}"></span>
          </form>
          {% navbars %}
        </div>
        <!-- /nav -->

      </div>
      <!-- /header -->

      <div class="container_16">
        
        <div class="grid_9 suffix_1">
          <div class="content">
            {% block content %}{% endblock %}
          </div>
        </div>
        
        <div id="right-rail" class="grid_6">
          {% block sidebar %}
          {% include 'sections/sidebar.html' %}
          {% endblock %}
        </div>

      </div>
      <!-- /container_16 -->

    {% endblock %}
    </div>
    <!-- /body-container -->

    <div id="footer">
      <p>
        {% cache 3600 "base.footer" %}
        {% flatblock "footer" 3600 "flatblocks/bare.html" %}
        {% endcache %}
      </p>
    </div>
    <!-- /footer -->

    <!-- google analtyics -->
    {% cache 7200 "base.analytics" %}
    {% analytics %}
    {% endcache %}
    {% block extra_body %}
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
      jQuery(function($) {
        $.getScript('{{ STATIC_URL }}js/prettify.js', function(){
          prettyPrint();
        });
      });
    </script>
    {% endblock %}
  </body>
</html>
